package tree

import "fmt"

type Node struct {
	Value       int
	Left, Right *Node
}

func (tree Node) Print() {
	fmt.Println(tree.Value)
}

func (tree *Node) SetValue(value int) {
	if tree == nil {
		fmt.Println("空指针")
		return
	}
	tree.Value = value
}

func CreateNode(value int) *Node {
	return &Node{Value: value}
}
